import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    { path: '/', name: 'home', component: () => import('../views/Home.vue') },
    { path: '/login', name: 'login', component: () => import('../views/Login.vue') },
    { path: '/register', name: 'register', component: () => import('../views/Register.vue') },
    { path: '/post/create', name: 'create', component: () => import('../views/CreatePost.vue') },
    { path: '/post/:id', name: 'detail', component: () => import('../views/PostDetail.vue') },
    { path: '/u/:id', name: 'profile', component: () => import('../views/Profile.vue') }
  ]
})
